package org.example.domain.strategy.model.entity;

import lombok.*;
import org.example.domain.strategy.model.vo.RuleLogicCheckTypeVO;

/**
 * 规则动作实体类
 * 规则执行后的结果
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {

    private String code = RuleLogicCheckTypeVO.ALLOW.getCode();
    private String info = RuleLogicCheckTypeVO.ALLOW.getInfo();
    private String ruleModel;
    private T data;

    static public class RaffleEntity{

    }

    /**
     *  “抽奖前的规则执行后” 的结果数据
     */
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class RaffleBeforeEntity extends RaffleEntity{
        //**策略id*/
        private Long strategyId;
        //**权重值key：用于抽奖时可以选择权重抽奖*/
        private String ruleWeightValueKey;
        //**奖品id*/
        private Integer awardId;
    }

    /**
     *
     *“抽奖中的规则执行后” 的结果数据
     *
     */
    static public class RaffleCenterEntity extends RaffleEntity{

    }

}
